/*   1:    */ package org.jetbrains.debugger.frame;
/*   2:    */ 
/*   3:    */

import com.intellij.ui.ColoredTextContainer;
import com.intellij.ui.SimpleTextAttributes;
import com.intellij.xdebugger.evaluation.XDebuggerEvaluator;
import com.intellij.xdebugger.frame.XCompositeNode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.debugger.*;

import java.util.List;

/*   4:    */
/*   5:    */
/*   6:    */
/*   7:    */
/*   8:    */
/*   9:    */
/*  10:    */
/*  11:    */
/*  12:    */
/*  13:    */
/*  14:    */
/*  15:    */
/*  16:    */
/*  17:    */
/*  18:    */
/*  19:    */
/*  20:    */ 
/*  21:    */ public final class CallFrameView
/*  22:    */   extends StackFrameImplBase
/*  23:    */   implements VariableContext
/*  24:    */ {
/*  25:    */   private final DebuggerViewSupport a;
/*  26:    */   private final CallFrame b;
/*  27:    */   private final Script c;
/*  28:    */   
/*  29:    */   public CallFrameView(@NotNull CallFrame paramCallFrame, @NotNull DebuggerViewSupport paramDebuggerViewSupport, @Nullable Script paramScript)
/*  30:    */   {
/*  31: 20 */     this(paramCallFrame, paramDebuggerViewSupport.getSourceInfo(paramScript, paramCallFrame), paramDebuggerViewSupport, paramScript);
/*  32:    */   }
/*  33:    */   
/*  34:    */   public CallFrameView(@NotNull CallFrame paramCallFrame, @Nullable SourceInfo paramSourceInfo, @NotNull DebuggerViewSupport paramDebuggerViewSupport, @Nullable Script paramScript)
/*  35:    */   {
/*  36: 27 */     super(paramSourceInfo);
/*  37:    */     
/*  38: 29 */     this.a = paramDebuggerViewSupport;
/*  39: 30 */     this.b = paramCallFrame;
/*  40: 31 */     this.c = paramScript;
/*  41:    */   }
/*  42:    */   
/*  43:    */   protected boolean isInFileScope()
/*  44:    */   {
/*  45: 36 */     List localList = this.b.getVariableScopes();
/*  46: 37 */     return (localList.size() == 1) && (((Scope)localList.get(0)).isGlobal());
/*  47:    */   }
/*  48:    */   
/*  49:    */   protected XDebuggerEvaluator createEvaluator()
/*  50:    */   {
/*  51: 42 */     return this.a.createFrameEvaluator(this);
/*  52:    */   }
/*  53:    */   
/*  54:    */   public Object getEqualityObject()
/*  55:    */   {
/*  56: 47 */     return this.b;
/*  57:    */   }
/*  58:    */   
/*  59:    */   protected void customizeInvalidFramePresentation(ColoredTextContainer paramColoredTextContainer)
/*  60:    */   {
/*  61: 52 */     assert (this.sourceInfo == null);
/*  62:    */     
/*  63: 54 */     String str = this.c == null ? "unknown" : this.c.getUrl().trimParameters().toDecodedForm();
/*  64: 55 */     int i = this.b.getLine();
/*  65: 56 */     paramColoredTextContainer.append(i != -1 ? str + ':' + i : str, SimpleTextAttributes.ERROR_ATTRIBUTES);
/*  66:    */   }
/*  67:    */   
/*  68:    */   public void computeChildren(@NotNull XCompositeNode paramXCompositeNode)
/*  69:    */   {
/*  70: 61 */     if (paramXCompositeNode == null) {
/*  71: 61 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/debugger/frame/CallFrameView", "computeChildren" }));
/*  72:    */     }
/*  73: 61 */     paramXCompositeNode.setAlreadySorted(true);
/*  74: 62 */     ScopeVariablesGroup.createAndAddScopeList(paramXCompositeNode, this.b.getVariableScopes(), this, this.b);
/*  75:    */   }
/*  76:    */   
/*  77:    */   @NotNull
/*  78:    */   public CallFrame getCallFrame()
/*  79:    */   {
/*  80: 67 */     CallFrame tmp4_1 = this.b;
/*  81: 67 */     if (tmp4_1 == null) {
/*  82: 67 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/debugger/frame/CallFrameView", "getCallFrame" }));
/*  83:    */     }
/*  84: 67 */     return tmp4_1;
/*  85:    */   }
/*  86:    */   
/*  87:    */   @NotNull
/*  88:    */   public EvaluateContext getEvaluateContext()
/*  89:    */   {
/*  90: 73 */     EvaluateContext tmp9_4 = this.b.getEvaluateContext();
/*  91: 73 */     if (tmp9_4 == null) {
/*  92: 73 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/debugger/frame/CallFrameView", "getEvaluateContext" }));
/*  93:    */     }
/*  94: 73 */     return tmp9_4;
/*  95:    */   }
/*  96:    */   
/*  97:    */   @Nullable
/*  98:    */   public String getName()
/*  99:    */   {
/* 100: 79 */     return null;
/* 101:    */   }
/* 102:    */   
/* 103:    */   @Nullable
/* 104:    */   public VariableContext getParent()
/* 105:    */   {
/* 106: 85 */     return null;
/* 107:    */   }
/* 108:    */   
/* 109:    */   public boolean watchableAsEvaluationExpression()
/* 110:    */   {
/* 111: 90 */     return true;
/* 112:    */   }
/* 113:    */   
/* 114:    */   @NotNull
/* 115:    */   public DebuggerViewSupport getDebugProcess()
/* 116:    */   {
/* 117: 96 */     DebuggerViewSupport tmp4_1 = this.a;
/* 118: 96 */     if (tmp4_1 == null) {
/* 119: 96 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/debugger/frame/CallFrameView", "getDebugProcess" }));
/* 120:    */     }
/* 121: 96 */     return tmp4_1;
/* 122:    */   }
/* 123:    */   
/* 124:    */   @NotNull
/* 125:    */   public MemberFilter getMemberFilter()
/* 126:    */   {
/* 127:102 */     DebuggerViewSupport tmp4_1 = this.a;
/* 128:102 */     if (tmp4_1 == null) {
/* 129:102 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/debugger/frame/CallFrameView", "getMemberFilter" }));
/* 130:    */     }
/* 131:102 */     return tmp4_1;
/* 132:    */   }
/* 133:    */   
/* 134:    */   @Nullable
/* 135:    */   public Scope getScope()
/* 136:    */   {
/* 137:108 */     return null;
/* 138:    */   }
/* 139:    */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.debugger.frame.CallFrameView

 * JD-Core Version:    0.7.0.1

 */